package day14;

public class homework07 {
    private static volatile int num=0;

    public static int getNum() {
        return num;
    }

    public homework07() {
    }

    public static void setNum(int num) {
        homework07.num = num;
    }
    public  static synchronized void increment(){
        homework07.setNum(getNum()+1);
    }
    public  static synchronized void crement(){
        homework07.setNum(getNum()-1);
    }
}
